namespace sql =
   "http://www.extensibility.com/saf/spec/safsample/sql-map.saf"
 namespace xhtml = "http://www.w3.org/1999/xhtml"
 
 xhtml:div [
   xhtml:title [ "Relax NG flat schema for our library" ]
   "\x{a}" ~
   "\x{a}" ~
   "     "
   xhtml:p [
     "This schema has been written by "
     xhtml:a [ href = "http://dyomedea.com/vdv" "Eric van der Vlist" ]
     "\x{a}" ~
     "."
   ]
   "\x{a}" ~
   "\x{a}" ~
   "   "
 ]
 start = element library { book-element+ }
 [
   sql:select [
     "select "
     sql:elem [ "name" ]
     ", "
     sql:elem [ "birthdate" ]
     ", "
     sql:elem [ "deathdate" ]
     " from tbl_author" 
   ]
 ]
 author-element =
   element author {
     attribute id { text },
     name-element,
     born-element,
     dead-element?
   }
 book-start =
   attribute id { text },
   isbn-element,
   title-element,
   author-element*
 book-end =
   author-element*,
   character-element*,
   attribute available { text }
 book-element = element book { book-start, book-end }
 born-element = element born { text }
 character-element =
   element character {
     attribute id { text },
     name-element,
     born-element,
     qualification-element
   }
 dead-element = element dead { text }
 isbn-element = element isbn { text }
 name-element = element name { text }
 qualification-element = element qualification { text }
 title-element =
   element title {
     attribute xml:lang { text },
     text
   }
